package cn.happy.day04;

public class 拍手游戏 {
    public static void main(String[] args) {
        int heard=0;
        int te=0;
        int ming=0;
        int hong=0;
        int sec=0;
        do {
//            if (sec%1==0 || sec%2==0 || sec%4==0){
//                heard+=1;
//                te+=1;
//                ming+=1;
//                hong+=1;
//            }
            boolean bHeard=false;
            if (sec%1==0 && te<10){
                bHeard=true;
                te+=1;
            }

            if (sec%2==0 && ming<10){
                bHeard=true;
                ming+=1;
            }
            if (sec%4==0 && hong<10){
                bHeard=true;
                hong+=1;
            }

            if (bHeard){
                heard+=1;
                System.out.println(sec);
            }

            sec+=1;
        }
        while (te<10 || ming<10 || hong<10);
        System.out.println(heard);
    }
}
